package com.wang.controller;

import com.wang.service.ArticleService;
import com.wang.service.LoginService;
import com.wang.service.SysUserService;
import com.wang.vo.Result;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private SysUserService sysUserService;


    @GetMapping("/currentUser")
    public Result getCurrentUser(@RequestHeader("token") String token) {
        return sysUserService.findUserByToken(token);
    }

}
